package com.example.lijinyuan.baseandroid.Intent;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.example.lijinyuan.baseandroid.R;


/**
 * Created by lijinyuan on 15/10/26.
 */
public class ExplicitIntent extends Activity {
    Button button1;
    Button button2;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.intent_explicit_intent);
        findViewById(R.id.intent_exp_intent1).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent();
                intent.putExtra("from", "intent");
                intent.setClass(ExplicitIntent.this, BlankIntent.class);
                startActivity(intent);


            }
        });
        findViewById(R.id.intent_exp_intent2).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent();
                Bundle bundle = new Bundle();
                bundle.putString("from", "bundle");
                intent.setClass(ExplicitIntent.this, BlankIntent.class);
                startActivity(intent);


            }
        });
    }
}
